<script type="text/javascript" charset="utf-8" src="__PUBLIC__/dest/ueditor/ueditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="__PUBLIC__/dest/ueditor/ueditor.all.min.js"></script>
<script type="text/javascript" charset="utf-8" src="__PUBLIC__/dest/ueditor/lang/zh-cn/zh-cn.js"></script>
<script type="text/javascript">
	$(document).ready(function(){


		$.formValidator.initConfig({
			formid:"userForm1",
			onerror:function(msg){
			},
			onsuccess:function(){
				
			}
		}); 
		$("#sms_user").formValidator({empty:false, onshow:"请输入短信接口账号", onfocus:"范围为（2-20个字）", oncorrect:" "})
		.functionValidator({fun:function(val,elem){
			if (val.length >= 2 && val.length <= 40){
				return true;
			}else{
				return 	'输入错误';
			}
		}});
		$("#sms_password").formValidator({empty:false,onshow:"请输入短信接口密码",onfocus:"范围为（2-20个字）",oncorrect:" "})
		.functionValidator({fun:function(val,elem){
			if (val.length >= 2 && val.length <= 40){
				return true;
			}else{
				return 	'输入错误';
			}
		}});
		$("#sms_message").formValidator({empty:false,onshow:"请输入认证验证码短信语",onfocus:"【%d】是验证码特殊符，请不要去掉，您可以放在合适的位置",oncorrect:" "})
		.functionValidator({fun:function(val,elem){
			if(val.indexOf('%d') == -1){
				return 	'短信语缺少【%d】';
			}
			return true;
		}});
		$("#sms_reg").formValidator({empty:false,onshow:"请输入注册验证码短信语",onfocus:"【%d】是验证码特殊符，请不要去掉，您可以放在合适的位置",oncorrect:" "})
		.functionValidator({fun:function(val,elem){
			if(val.indexOf('%d') == -1){
				return 	'短信语缺少【%d】';
			}
			return true;
		}});
		
		
		


		
	});
</script>


<div class="page-content">
	<div class="row">
		<div class="col-xs-12"> 
			<form name="userForm1" id="userForm1" novalidate="" action="{:U('Config/save_sms_config')}" method="post"> 
				<div class="form-horizontal">
					
					
					<div class="form-group" >
						<label class="col-sm-2 control-label no-padding-right margintop5" > 
							短信账号： 
						</label>
						<div class="col-sm-4">
							<div class="input-group col-xs-10 col-sm-12 ">
								<input type="text" id="sms_user" name="sms_user"  class="form-control" value="{$sms_user}"/>
							</div>
							
						</div>
						<div class="help-block col-sm-6" >
							<span id="sms_userTip"></span>
						</div>
					</div>
					<div class="form-group" >
						<label class="col-sm-2 control-label no-padding-right margintop5"> 
							短信密码： 
						</label>
						<div class="col-sm-4">
							<div class="input-group col-xs-12">
								<input type="text" id="sms_password" name="sms_password" class="form-control" value="{$sms_password}"/>
							</div>
						</div>
						<div class="help-block col-sm-6" >
							<span id="sms_passwordTip"></span>
						</div>
					</div>
					<div class="form-group" >
						<label class="col-sm-2 control-label no-padding-right margintop5"> 
							认证验证码短信： 
						</label>
						<div class="col-sm-4">
							<div class="input-group col-xs-12">
								<input type="text" id="sms_message" name="sms_message" class="form-control" value="{$sms_message}"/>
							</div>
						</div>
						<div class="help-block col-sm-6" >
							<span id="sms_messageTip"></span>
						</div>
					</div>
					<div class="form-group" >
						<label class="col-sm-2 control-label no-padding-right margintop5"> 
							平台注册验证码短信： 
						</label>
						<div class="col-sm-4">
							<div class="input-group col-xs-12">
								<input type="text" id="sms_reg" name="sms_reg" class="form-control" value="{$sms_reg}"/>
							</div>
						</div>
						<div class="help-block col-sm-6" >
							<span id="sms_regTip"></span>
						</div>
					</div>
				
					
					<div id="alert_box"></div>
					<div class="clearfix form-actions">
						<div class="col-md-offset-3 col-md-9 col-sm-9">
							<button id="save" class="col-sm-2 btn btn-success" data-loading-text="正在提交,请稍候..." type="submit">
								<i class="icon-save bigger-110"></i>
							 	<span id="submitbutton">保存</span>
							</button>
							
						</div>
					</div>
				</div>
			</form>
		</div>
	</div>
</div>